/*
 * @Description: 产品报表接口
 * @Author: lwx
 * @Date: 2022-12-01 15:58:17
 * @LastEditors: lwx
 * @LastEditTime: 2023-04-12 11:29:42
 */

import request from '@/utils/request'

/* 产品追溯 ->堆叠工位 */
export function stackData(barcodes) {
    return request({
        url: '/retrospect/stack',
        method: 'GET',
        params: {
            barcodes
        }
    })
}

/* 产品追溯 ->焊接工位 */
export function weldingData(barcodes) {
    return request({
        url: '/retrospect/welding',
        method: 'GET',
        params: {
            barcodes
        }
    })
}

/* 产品追溯 ->测漏工位 */
export function leakData(barcodes, sep_number) {
    return request({
        url: '/retrospect/leak',
        method: 'GET',
        params: {
            barcodes,
            sep_number
        }
    })
}

/* 导出产品报表 */
export function exportSN(data) {
    return request({
        url: '/retrospect/outfile',
        method: 'GET',
        params: data,
        responseType: 'blob'
    })
}
/* 按日期查找SN */
export function searchSN(date) {
    return request({
        url: '/barcodes/lists',
        method: 'GET',
        params: {
            date
        }
    })
}